a11y: Update the level property for tree expanders
authorEmmanuele Bassi <ebassi@gnome.org>
Thu, 22 Apr 2021 13:37:39 +0000 (14:37 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Thu, 22 Apr 2021 13:40:35 +0000 (14:40 +0100)
We already have the depth of a tree expander in order to compute the
indentation.

Fixes: #3892
gtk/gtktreeexpander.c

index 4ebc072236cb5d52f5e94818e8532c58ad958a0c..19b577d826f07fe9a65e109a188fbf72e7bc6dc6 100644 (file)
@@ -239,6 +239,11 @@ gtk_tree_expander_update_for_list_row (GtkTreeExpander *self)
             }
         }
 
+      /* The level property is >= 1 */
+      gtk_accessible_update_property (GTK_ACCESSIBLE (self),
+                                      GTK_ACCESSIBLE_PROPERTY_LEVEL, depth + 1,
+                                      -1);
+
       while (child)
         {
           GtkWidget *prev = gtk_widget_get_prev_sibling (child);